home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 5
/
The 640 Meg Shareware Studio CD-ROM Volume V (Data Express)(1994).ISO
/
amiga
/
d_ames23.lha
/
AutoMessage2
next >
Wrap
Text File
|
1994-02-19
|
11KB
|
220 lines
/**************************************************************************\
AutoMessage, v2.3 Another: Dotoran/Galactus Partner Project.
$VER: AutoMessage, v2.3 (20-Feb-94) by Dotoran & Galactus!
\**************************************************************************/
options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
tr=transmit ; se=sendstring ; gc=getchar
/**************************************************************************\
SysOp Definable Variables : Refer to "_READ_ME" file for more info!
\**************************************************************************/
DirFile="GFILES:" /* Support File Location; Must end in : or / */
SFlag=1 /* Show SignOn Immediately? (1=Yes,0=No) */
LFlag=1 /* Show LogOff Immediately? (1=Yes,0=No) */
SDFlag=2 /* SignOn Format: (0=Letter,1=Memo#1,2=Memo#2) */
LDFlag=2 /* LogOff Format: (0=Letter,1=Memo#1,2=Memo#2) */
EdLines=15 /* Total Lines to Allow in CNet Editor. */
MinUse=1 /* Mins Used to be considered "during signon" *|
*|
***************************************************************************/
getuser 1 ; Handle=result ; Date=date(s) ; call READDATA ; Flag=0
getuser 1400030 ; u=result*10 ; getuser 1307444 ; c=strip(result)
if u<MinUse then Flag=1 ; if index('QOR',upper(c))>0 then Flag=2
bbsidentify name ; bbsname=result ; bbsidentify sysop ; sysop=result
START:
OnFlag=exists(DirFile'Mess.SignOn') ; OffFlag=exists(DirFile'Mess.LogOff')
if SFlag=1 & Flag=1 then signal SIGNON ; if LFlag=1 & Flag=2 then signal LOGOFF
START1:
tr 'f1n1cb- c6'bbsname' cdAuto Message cb-n1'
if Flag~=2 then tr 'caIs cbSignon caMessage cfActiveca: 'word('c9No ceYes',OnFlag+1)'ca!'
if Flag~=1 then tr 'caIs cbLogoff caMessage cfActiveca: 'word('c9No ceYes',OffFlag+1)'ca!'
tr 'n1z4c3▀cb Auto Message Main Menu 2.3 z4cb▀z0n1'
tr ' c5(c7Cc5)c7reate c5The Auto Message'
tr ' c5(cbVc5)cbiew c5The Auto Message'
tr ' c5(c6Ec5)c6dit c7The Auto Message'
tr ' c5(c7Ac5)cebout cbThe Auto Message'
tr ' c5(c7Qc5)c7uit cbThe Auto Messagen1'
se 'z4cbYour Selection?z0 cb(ceCcb/ceVcb/ceEcb/ceAcb/cdQcb)cf: ce'
gc ; aa=result ; call CHECK ; a=index('VCEA/?HQ',aa) ; if a=0 then a=8
if a=1 then do ; tr 'View' ; signal VIEW ; end
if a=2 then do ; tr 'Create' ; signal CREATE ; end
if a=3 then do ; tr 'Edit' ; signal EDIT ; end
if a>3 & a<8 then do ; tr 'About' ; signal ABOUT ; end
tr 'cdQuit'
signal BYE
VIEW:
if OnFlag+OffFlag=0 then do
tr 'n1cfThere are c9NO ceAuto cbMessages cfto caVIEWcf!'
call PRESS ; signal START ; end
if Flag=1 then signal SIGNON ; if Flag=2 then signal LOGOFF
se 'n1ceViewcf> cbSca:cfignOn, cbLca:cfogoff, or cdQca:cfQuit? cb(ceScb/ceLcb/cdQcb)cf: ce'
gc ; aa=result ; call CHECK ; a=index('SLQ',aa) ; if a=0 then a=3
if a=3 then do ; tr 'Quit' ; signal START ; end
if a=1 & Flag~=2 then do ; tr 'SignOn' ; signal SIGNON ; end
if a=2 & Flag~=1 then do ; tr 'LogOff' ; signal LOGOFF ; end
SIGNON:
if OnFlag=0 then do
tr 'n1cfThere is c9NO caSignOn ceAuto cbMessagecf!' ; signal SIGNON1 ; end
if SDFlag=0 then do ; tr 'f1z5cb Sign On Auto Message z0Cce'DateS'n2cfDear cav01}cf,'
tr '*0'DirFile'Mess.SignOn}n1Ccb- cd'OnHandle ; end
if SDFlag=1 then do
tr 'f1cb Toc9: cev01}n1cbFromc9: cf'OnHandle'n1cbDatec9: ca'DateS
se 'cb Rec9: cdSign On Auto Messagen1*0'DirFile'Mess.SignOn}' ; end
if SDFlag=2 then do
tr 'f1cb Toc9: cev01}n1cbDatec9: ca'DateS'n1'
se 'cd'center('Sign On Auto Message',78)'n1*0'DirFile'Mess.SignOn}'
tr 'n1Cc9-ca 'OnHandle' c9-' ; end
SIGNON1:
call PRESS ; if SFlag=1 & Flag=1 then do
se 'n1cfWould c9YOU cflike to leave a caSignOn cbAuto ceMessage cffor the cdNEXT '
se 'cfuser that signs on to cd'bbsname'cf? cb(caycb/caNcb)cf: ca' ; gc ; a=result
if a='Y' then do ; tr 'Yes.' ; CFlag=1 ; signal CREATE1 ; end
else tr 'No.' ; signal BYE ; end
signal START
LOGOFF:
if OffFlag=0 then do
tr 'n1cfThere is c9NO caLogoff ceAuto cbMessagecf!' ; signal LOGOFF1 ; end
if LDFlag=0 then do ; tr 'f1z5cb Log Off Auto Message z0Cce'DateL'n2cfDear cav01}cf,'
tr '*0'DirFile'Mess.LogOff}n1Ccb- cd'OffHandle ; end
if LDFlag=1 then do
tr 'f1cb Toc9: cev01}n1cbFromc9: cf'OffHandle'n1cbDatec9: ca'DateL
se 'cb Rec9: cdLog Off Auto Messagen1*0'DirFile'Mess.LogOff}' ; end
if LDFlag=2 then do
tr 'f1cb Toc9: cev01}n1cbDatec9: ca'DateL'n1'
se 'cd'center('Log Off Auto Message',78)'n1*0'DirFile'Mess.LogOff}'
tr 'n1Cc9-ca 'OffHandle' c9-' ; end
LOGOFF1:
call PRESS ; if LFlag=1 & Flag=2 then do
se 'n1cfWould c9YOU cflike to leave a caLogOff cbAuto ceMessage cffor the cdNEXT '
se 'cfuser that logs off cd'bbsname'cf? cb(caycb/caNcb)cf: ca' ; gc ; a=result
if a='Y' then do ; tr 'Yes.' ; CFlag=2 ; signal CREATE1 ; end
else tr 'No.' ; signal BYE ; end
signal START1
CREATE:
if Flag=1 then do ; CFlag=1 ; signal CREATE1 ; end
if Flag=2 then do ; CFlag=2 ; signal CREATE1 ; end
se 'n1ceCreatecf> cbSca:cfignOn, cbLca:cfogoff, or cdQca:cfQuit? cb(ceScb/ceLcb/cdQcb)cf: ce'
gc ; aa=result ; call CHECK ; a=index('SLQ',aa) ; if a=0 then a=3
if a=3 then do ; tr 'cdQuit' ; signal START ; end
if a=1 then do ; tr 'SignOn' ; CFlag=1 ; end
if a=2 then do ; tr 'Logoff' ; CFlag=2 ; end
CREATE1:
cleareditor ; file=DirFile'Mess.'word('SignOn LogOff',CFlag)
se "n1cfUsing cdCNet's Editorcf, create your ceAuto ca"
tr word('SignOn LogOff',CFlag)" cbMessage cfnow:c6"
calleditor EdLines ; st=result ; if st=0 then tr 'c9Aborted.'
if st=1 then do ; se 'cbSaving...' ; saveeditor file ; st=result
if st=0 then tr 'h9c9Error during Save.' ; else tr 'h6ed.'
if CFlag=1 then do ; OnHandle=Handle ; OnDate=Date ; end
else do ; OffHandle=Handle ; OffDate=Date ; end
call SAVEDATA ; end ; call PRESS ; Log=CFlag
if Flag=1 & SFlag=1 then signal BYE ; if Flag=2 & LFlag=1 then signal BYE
signal START
EDIT:
if OnFlag+OffFlag=0 then do
tr 'n1cfThere are c9NO ceAuto cbMessages cfto csEDITcf!'
call PRESS ; signal START ; end
if Flag=1 then do ; CFlag=1 ; signal EDIT1 ; end
if Flag=2 then do ; CFlag=2 ; signal EDIT1 ; end
se 'n1ceEditcf> cbSca:cfignOn, cbLca:cfogoff, or cdQca:cfQuit? cb(ceScb/ceLcb/cdQcb)cf: ce'
gc ; aa=result ; call CHECK ; a=index('SLQ',aa) ; if a=0 then a=3
if a=3 then do ; tr 'Quit' ; signal START ; end
if a=1 then do ; tr 'SignOn' ; CFlag=1 ; end
if a=2 then do ; tr 'Logoff' ; CFlag=2 ; end
EDIT1:
if CFlag=1 & OnFlag=0 then do
tr 'n1cfThere is c9NO caSignOn ceAuto cbMessage cfto cdEDITcf!'
call PRESS ; signal START ; end
if CFlag=2 & OffFlag=0 then do
tr 'n1cfThere is c9NO caLogoff ceAuto cbMessage cfto cdEDITcf!'
call PRESS ; signal START ; end
se "n1cfUsing cdCNet's Editorcf, edit this ceAuto ca"
tr word('SignOn LogOff',CFlag)' cbMessage cfnow:c6'
file=DirFile'Mess.'word('SignOn LogOff',CFlag)
loadeditor file ; calleditor EdLines ; st=result ; if st=0 then do
se 'c9Delete cfthe ceAuto ca'word('SignOn LogOff',CFlag)' cbMessage? cf(ceYcf/cencf)cb: ce'
gc ; a=result ; if a='N' then do ; tr 'No.' ; signal START ; end
tr 'Yes. c9Deleting...$odelete 'file'}w1h6ed.'
signal START ; end
if st=1 then do ; se 'cbSaving...' ; saveeditor file ; st=result
if st=0 then tr 'h9c9Error during Save.' ; else tr 'h6ed.'
if CFlag=1 then do ; OnHandle=Handle ; OnDate=Date ; end
else do ; OffHandle=Handle ; OffDate=Date ; end
call SAVEDATA ; end ; call PRESS ; Log=CFlag+2
signal START
ABOUT:
tr 'f1ce'
tr 'C▄▀▀▄ █ █ ▀▀█▀▀ ▄▀▀▄ █▄ ▄█ █▀▀▀ ▄▀▀▄ ▄▀▀▄ ▄▀▀▄ ▄▀▀▄ █▀▀▀'
tr 'C█▀▀█ █ █ █ █ █ ▀▀ █ ▀ █ █▀▀ ▀▄ ▀▄ █▀▀█ █ ▄▄ █▀▀'
tr 'C█ █ ▀▄▄▀ █ ▀▄▄▀ █ █ █▄▄▄ ▀▄▄▀ ▀▄▄▀ █ █ ▀▄▄▀ █▄▄▄cf'
se 'n1 Auto Message is a neat little program that lets you create a '
se 'short message that will be automatically displayed when the next '
se 'user signs on to this bbs. You can also create an Auto Message '
se 'that will be displayed when the next user logs off of this bbs.'
se 'n2 You can also view either Auto Message, if it exists, edit '
se 'the existing Auto Message, or create a brand new one all your own.'
se 'n2 I hope you enjoy this program, and good luck in your Auto '
tr 'Message creations.n2Cca'sysop ; call PRESS
signal START
PRESS:
se 'n1Ccb(cfPress ceENTER cfDude!cb)i1 40}'
return
READDATA:
if ~exists(DirFile'Mess.Data') then do
call open(f1,DirFile'Mess.Data','w')
call writeln(f1,'No One|'date'|x')
call writeln(f1,'No One|'date'|x')
call close(f1) ; end
call open(f1,DirFile'Mess.Data','r')
a=readln(f1) ; parse var a OnHandle'|'OnDate'|'junk
a=readln(f1) ; parse var a OffHandle'|'OffDate'|'junk
call close(f1)
if SDFlag=1 then DateS=date('u',OnDate,'s')
if SDFlag=0 | SDFlag=2 then do
on=date('n',OnDate,'s') ; m=date('m',OnDate,'s')
DateS=m' 'strip(word(on,1),'l','0')', 'word(on,3) ; end
if LDFlag=1 then DateL=date('u',OffDate,'s')
if LDFlag=0 | LDFlag=2 then do
off=date('n',OffDate,'s') ; m=date('m',OffDate,'s')
DateL=m' 'strip(word(off,1),'l','0')', 'word(off,3) ; end
return
SAVEDATA:
call open(f1,DirFile'Mess.Data','w')
call writeln(f1,OnHandle'|'OnDate'|x')
call writeln(f1,OffHandle'|'OffDate'|x')
call close(f1) ; call READDATA
return
BYE:
if Log=1 then logentry 'caCreated cfSignOn ceAuto cbMessagecf!'
if Log=2 then logentry 'caCreated cfLogOff ceAuto cbMessagecf!'
if Log=3 then logentry 'caEdited cfSignOn ceAuto cbMessagecf!'
if Log=4 then logentry 'caEdited cfLogOff ceAuto cbMessagecf!'
bufferflush
exit
CHECK:
if result~='###PANIC' then return
tr 'f1n9Loss of Carrier'
logentry 'Loss of Carrier in AutoMessage2'
bufferflush
exit
SYNTAX: ; ERROR: ; IOERR: ; gu 1311992 ; a=result ; gu 1311960 ; b=result
er='z4cf'a||b'z0 c9ERRORce: cb'rc' cf(ce'errortext(rc)'cf) c6'
er=er||'in line ca'sigl'c6.' ; tr 'n1'er ; logentry er ; bufferflush
/** END *******************************************************************\
\****************************************** FRONTIERS BBS (716)/823-9892 **/